package com.zhouys.dao;

import com.zhouys.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.HashMap;
import java.util.List;

public interface UserMapper {

    @Select("select * from jdbc.my_user")
    List<User> getUsers();

    @Select("select * from jdbc.my_user where id =#{id} ")
    User getUserByID(@Param("id") int id);

    @Insert("insert  into  jdbc.my_user (id,name ,pwd) value (#{id},#{name},#{pwd})")
    int addUserById(User user);


}
